package com.itts.middle.modules.project.controller;

import com.itts.common.entity.Project;
import com.itts.common.util.result.R;
import com.itts.middle.controller.BaseController;
import com.itts.middle.modules.project.mapper.ProjectMapper;
import com.itts.middle.modules.project.service.ProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/project")
public class ProjectController extends BaseController {

    @Autowired
    ProjectMapper projectMapper;

    @Autowired
    ProjectService projectService;

    @GetMapping("/list")
    public R selectProject(){
        List<Project> list = projectService.list();
        List<Project> projectList = projectService.selectList();
        return R.okData(projectList);
    }
    @GetMapping("/cshi")
    public R selectp(){

        return R.ok();

    }
}
